package com.example.demo.repository;

import com.example.demo.domain.UrlConfig;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;
import org.springframework.stereotype.Repository;

/**
 * URL配置管理Repository
 * @Author zhengmf
 * @Date 2018/12/27  17:40
 */
@Repository
public interface UrlConfigRepository extends JpaRepository<UrlConfig, Long> {
    @Modifying
    @Query("update UrlConfig set status = :status where id = :id")
    void updateStatus(@Param(value = "id") Long id, @Param(value = "status") String status);

}
